﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Estimate
{
    public partial class formManualUnit : FormMDIChildTemplate
    {
        public formManualUnit()
        {
            InitializeComponent();
        }

        private void formManualUnit_Load(object sender, EventArgs e)
        {
            LoadUnit(); root.TranslateGrid(gridUnit);
        }
        void LoadUnit() 
        {
        
            var units = from x in context.Units orderby x.UnitName select x;
           // var unitTypes = from x in context.UnitTypes select x;
            unitBindingSource.DataSource = units;
          //  unitTypebindingSource.DataSource = unitTypes.ToList();
        
        }

       

        private void saveToolStripButton_Click(object sender, EventArgs e)
        {
            root.Submit(); LoadUnit();
        }
// nepokazue nfzv  vgridi i shob zapamyatalo nove znachennya tra perevesty focus z raydka

    }
}
